<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8" />
  <meta http-equiv="X-UA-Compatible" content="IE=edge" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <title>AI助手</title>
  <script src="https://i.sgcc.com.cn:18080/capsule/capsule2.0.js"></script>
  <script src="./js/capsuleUtils.js"></script>
  <link rel="stylesheet" href="./css/mui.min.css" />
  <script src="./js/mui.min.js"></script>
  <link rel="stylesheet" type="text/css" href="./css/app.css" />
  <script src="./js/vconsole.min.js"></script>
  <script src="./js/jquery-3.6.0.min.js"></script>
  <!-- <script src="./js/jweixin-1.2.0.js"></script> -->
  <script src="./js/jweixin-sgccigw-1.0.0.js"></script>
  <script src="./js/sm3.js"></script>
  <script src="./js/sm2.js"></script>
  <script src="./common/text.js"></script>
  <script src="./js/flexible.js"></script>
  <script src="./js/login.js"></script>

  <style>
    .hanker {
      height: 100%;
      width: 100%;
      position: fixed;
      left: 0;
      top: 0;
      z-index: 1;
    }

    .retMask {
      display: flex;
      flex-direction: column;
      /* z-index: 20001; */
      width: 100%;
      height: 100%;
      position: relative;
      background-image: url("./image/AISY.png");
      background-repeat: no-repeat;
      background-size: 100% 100%;
      /* background: white; */
    }

    .retMask .header {
      height: 1rem;
    }

    /* .retMask .header img {
      margin-top: 0.2rem;
      width: 4rem;
      padding-left: 0.3rem;
    } */

    .retMask .content {
      width: 100%;
      display: flex;
      justify-content: center;
      position: absolute;
      top: 9%;
    /* left: %; */
      /* text-align: center; */
    }

    .retMask .content img {
      /* margin-top: 2.4rem; */
     
      width: 2.3rem;
    
    }


    .retMask .showP {
      position: absolute;
      left: 0.3rem;
      font-size: 0.35rem;
      bottom: 0.15rem;
      animation: blink 2s linear infinite;
      -webkit-animation: blink 2s linear infinite;
      -moz-animation: blink 2s linear infinite;
      -ms-animation: blink 2s linear infinite;
      -o-animation: blink 2s linear infinite;
    }

    @keyframes blink {
      0% {
        color: rgb(68, 67, 67);
      }

      50% {
        color: transparent;
      }

      100% {
        color: rgb(68, 67, 67);
      }
    }

    .close {
      position: absolute;
      left: .12rem;
      width: .8rem;
  height: .8rem;
      top: .2rem;
    }
  </style>
</head>

<body>
  <div class="retMask">
    <div class="_igw_capsule_className"></div>
    <div class="header">
      <img src="./image/left.png" alt="" class="close" id="close" onclick="close()" />
    </div>
    <div class="content">
      <img src="./image/logoImg.png" alt="">
    </div>
    <p class="showP" id="showP">正在初始化...</p>
  </div>
</body>
<script>
  sessionStorage.removeItem("search")
  $(function () {
    $("#showP").html("正在初始化...")
    $.getScript("./js/jweixin-1.2.0.js" /*"js/jweixin-1.0.0.js"*/ , function() {
        'use strict';
       
        jsApiList = [
            "getLocation",
            "getAuthCode",
            "ext_ISCP_RhConfig",
            "setFloatWindow",
            "openChatWithMsg",
            "shareAppMessage",
            "agentConfig",
            "ext_Net_Upload",
            "getLocalResPath",
            "ext_FileBrowser_StartPreView",
            "ext_FileManager_Information",
            'ext_ISCP_Init',
            'ext_ISCP_ConnectService',
            'ext_ISCP_GetLocalPort',
            'ext_ISCP_Close',
            'ext_ISCP_Status',
            'ext_Popover_Open',
            'ext_Popover_Close',
            "multiWindows_open",
            "multiWindows_close",
            "ext_Net_FragmentUpload",
            "multiWindows_startWidget",
            "multiWindows_finishWidget",
            "multiWindows_subscribe",
            "multiWindows_publish",
            'shareWechatMessage',
            'onMenuShareTimeline',
            'chooseImage',
            'getLocalImgData',
            'previewImage',
            'uploadImage',
            'downloadImage',
            'previewFile',
            'ext_AudioRecorder_Start',
            'ext_AudioRecorder_Stop',
            'startRecord',
            'ext_Net_Download',
            'stopRecord',
            'onVoiceRecordEnd',
            'playVoice',
            'playVoice',
            'stopVoice',
            'onVoicePlayEnd',
            'startRecordVoiceBuffer',
            'onRecordBufferReceived',
            'stopRecordVoiceBuffer',
            'uploadVoice',
            'downloadVoice',
            'translateVoice',
            'ext_Net_MultiDownload',
            'getZipAppDirectory',
            'setClipboardData',
            'getClipboardData',
            'ext_FileBrowser_ChooseDir',

            'openLocation',
            'startAutoLBS',
            'stopAutoLBS',
            'onLocationChange',

            'onHistoryBack',
            'closeWindow',
            'openUrl',
            'ext_FileBrowser_ChooseDir',
            'ext_FileBrowser_AppointDirChooseFile',
            'scanQRCode',

            'launch3rdApp',

            'ocr',

            'checkJsApi',
        ];
        wx.ready(function() {
          wx.invoke("agentConfig", {
                 agentid: '1003505',
                 corpid: 'ww4d11a39991ebffdc',
                 timestamp: 1639582452,
                 nonceStr: 'AMQGnmTMzhJetshY',
                 signature: 'fb9f560a9b4824f7db3525926994010de74ea055',
                 jsApiList: jsApiList
            }, function(data) {
              console.log(data,"agentConfig")
              if(data.err_msg == "agentConfig:ok"){
                  wx.invoke('getAuthCode', {
                   response_type: 'code',//固定参数
                   scope: 'snsapi_base'//固定参数
                   }, function (res) {
                    if(res.err_msg == "getAuthCode:ok"){
                      iscp_ready(res.code)
                    }else{
                      $("#showP").html("获取用户信息失败")
                    }
        })
    }
});
// CAPSULE.show();
        });
        wx.config({
            beta: true,
            debug: false,
            appId: "ww4d11a39991ebffdc",
            timestamp: "1639582452",
            nonceStr: "AMQGnmTMzhJetshY",
            signature:"fb9f560a9b4824f7db3525926994010de74ea055",
            jsApiList: jsApiList 
        });
       
  });
})
  var btn = document.getElementById("close");
  btn.onclick = function () {
    if (!isFlag) {
      closeIscp();
    }
    wx.closeWindow();
  };
</script>

</html>